<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="mall.demo.util.SessionKeyEnum" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="mall.demo.mybatis.pojo.Product" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<%
List<Product> list = (List<Product>)session.getAttribute(SessionKeyEnum.crawlProducts.name());
if (list == null) {
	list = new ArrayList<Product>();
}
%>
<body>
<table>
<tr><th>Code</th><th>Name</th><th>Description</th><th>Price</th></tr>
<% for (Product p : list) {%>
<tr><td><%= p.getCode() %></td>
<td><%= p.getName() %></td>
<td><%= p.getDescription() %></td>
<td><%= p.getPrice() %></td>
</tr>
<% } %>

</table>
<a href="<%=request.getContextPath() %>/admin/crawler1.jsp">会抓取页面</a>
<a href="<%=request.getContextPath() %>/servlet/addCrawler">全部插入数据库</a>
</body>
</html>